Skip to content

Clarify WebTransport datagram writable support#44317

Open
KirtiRamchandani wants to merge 1 commit into
mdn:mainfrom
KirtiRamchandani:docs/webtransport-datagram-writable-note
Open

Clarify WebTransport datagram writable support#44317
KirtiRamchandani wants to merge 1 commit into
mdn:mainfrom
KirtiRamchandani:docs/webtransport-datagram-writable-note

Conversation

@KirtiRamchandani

Copy link
Copy Markdown
Contributor

Description

Adds explicit deprecated/non-standard markers and compatibility notes beside the WebTransport datagram examples that use WebTransportDatagramDuplexStream.writable.

Motivation

The WebTransport.datagrams page can show Baseline support for the datagrams property while the outgoing datagram example uses writable, which has separate compatibility data, is deprecated, is non-standard, and is not supported in Safari. The added notes make that distinction visible where readers encounter the example.

Additional details

The same outgoing datagram example appears on the WebTransportDatagramDuplexStream overview, so this updates both pages consistently.

Related issues and pull requests

Fixes #44273

Tests

  • Prettier 3.8.3 check on the two touched pages
  • MarkdownLint CLI 0.22.1 with MDN config on the two touched pages
  • git diff --check -- files/en-us/web/api/webtransport/datagrams/index.md files/en-us/web/api/webtransportdatagramduplexstream/index.md

@KirtiRamchandani KirtiRamchandani requested a review from a team as a code owner June 1, 2026 09:19
@KirtiRamchandani KirtiRamchandani requested review from hamishwillee and removed request for a team June 1, 2026 09:19
@github-actions github-actions Bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Jun 1, 2026
@hamishwillee

Copy link
Copy Markdown
Collaborator

@KirtiRamchandani As discussed, it's best not to fix issues that still have the "needs-triage" label - they might not be correct, and even if they are true, the proposed solution might not be optimal.

I've suggested a solution in in #44273 (comment)
I still think your note is also useful in addition, but it probably should mention both the deprecated method and the new alternative, so people can make an informed decision.

@KirtiRamchandani

Copy link
Copy Markdown
Contributor Author

Thanks, updated in fe3ec4495e to follow the suggested direction:

  • the examples now use transport.datagrams.createWritable() when supported.
  • they fall back to transport.datagrams.writable with an inline deprecated/non-standard comment.
  • the note now mentions both the newer method and the deprecated property so readers know to check compatibility before choosing a write API.

Local checks:

  • corepack npm exec --yes --package prettier@3.8.3 -- prettier --check files/en-us/web/api/webtransport/datagrams/index.md files/en-us/web/api/webtransportdatagramduplexstream/index.md
  • corepack npm exec --yes --package markdownlint-cli2@0.22.1 --package markdownlint-rule-search-replace@1.2.0 -- markdownlint-cli2 files/en-us/web/api/webtransport/datagrams/index.md files/en-us/web/api/webtransportdatagramduplexstream/index.md
  • git diff --check

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Preview URLs (2 pages)

Flaws (4)

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/API/WebTransport/datagrams
Title: WebTransport: datagrams property
Flaw count: 2

  • macros:
    • Macro domxref produces link /en-US/docs/Web/API/WebTransportDatagramDuplexStream/createWritable which doesn't resolve
    • Macro domxref produces link /en-US/docs/Web/API/WebTransportDatagramsWritable which doesn't resolve

URL: /en-US/docs/Web/API/WebTransportDatagramDuplexStream
Title: WebTransportDatagramDuplexStream
Flaw count: 2

  • macros:
    • Macro domxref produces link /en-US/docs/Web/API/WebTransportDatagramDuplexStream/createWritable which doesn't resolve
    • Macro domxref produces link /en-US/docs/Web/API/WebTransportDatagramsWritable which doesn't resolve

(comment last updated: 2026-06-09 06:36:50)

@hamishwillee hamishwillee force-pushed the docs/webtransport-datagram-writable-note branch 2 times, most recently from 7acd1bc to 49119c3 Compare June 9, 2026 06:34
docs: update WebTransport datagram writable example
@hamishwillee hamishwillee force-pushed the docs/webtransport-datagram-writable-note branch from 49119c3 to fcf7d62 Compare June 9, 2026 06:35
@hamishwillee

Copy link
Copy Markdown
Collaborator

I've created #44383 that this can go in after. Note, I also modified the text slightly. This was merged into your commit accidentally, so it ias attributed to you. I decided not to use a note to highlight the differences between the method and property.

Anyway, I'll look at this again after #44383 goes in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebTransport docs still uses examples with deprecated/non-standard writable property

3 participants